<template>
    <div class="time">
        {{time}}
    </div>
</template>

<script>
  export default {
     name:'setTime',
     data () {
         return {
             time:''
         }
     },
     mounted () {
       this.getNowTiem()  
     },
     methods: {
       getNowTiem(){
        this.time = new Date()
       }  
     }
  }
</script>

<style  lang='less' scoped>
.time{
    margin: 10px 0 0 40%;
    font-size: 20px;
}
</style>